home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / dnet / dshterm1_0.lha / include / st / asyncio.h next >
Encoding:
C/C++ Source or Header  |  1992-02-04  |  866 b   |  36 lines

  1.  
  2.  
  3. /* AsyncIO include */
  4.  
  5. #define APORTNAMESIZE    20
  6. struct APort {
  7.     struct MsgPort            *Port;
  8.     struct AFileHandle        *First;
  9.     char                    PortName[APORTNAMESIZE];
  10. };
  11.  
  12. struct AFileHandle {
  13.     struct StandardPacket    Pkt;            /* Which also contains exec msg */
  14.     struct AFileHandle        *Next,*Prev;
  15.     struct APort            *APort;
  16.     struct FileHandle         *FileHandle;
  17.     long                    Status;
  18.     long                    Flags;
  19. };
  20.  
  21. /* status values */
  22. #define ASTATUS_FIRSTTIME    -3    /* when file is first opened */
  23. #define ASTATUS_IDLE        -2  /* No packet is pending */
  24. #define ASTATUS_BUSY        -1  /* Packet has been sent */
  25.  
  26. #define ASIGBIT(a)    ((a)->APort->Port->mp_SigBit)
  27. #define ARESULT1(a)    ((a)->Pkt.sp_Pkt.dp_Res1)
  28. #define ARESULT2(a) ((a)->Pkt.sp_Pkt.dp_Res2)
  29. #define ASTATUSQUICK(a)    ((a)->Status)
  30. #define AEASYCLEANUP(a) (ADeletePort((a)->APort))
  31.  
  32. /* flag values */
  33. #define AFLAG_NOCLOSE        0
  34. #define AFLAG_CLOSEONCLOSE    1
  35.  
  36.